package com.online.onlinestudent.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("admins")
public class Admin extends User{

    @TableId(value = "id", type =  IdType.AUTO)
    private Long id;

    private String username;

    private String password;

    private String email;

    private Integer age;

    private String gender;

    private String phone;

    private String address;
    // 创建时间，插入时自动填充
    @TableField(fill = FieldFill.INSERT)

    private LocalDateTime createdAt;
    // 更新时间，插入和更新时自动填充
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    private Integer isWho;// 0为学生，1为老师,2为管理员



    // Enum for gender
    public enum Gender {
        M, F, O
    }


}